Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StandUpStreak - implement internal counter #345

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

LucyAnne98
Copy link

@LucyAnne98 LucyAnne98 commented May 6, 2022

Implements:

  • per member stand-up stats counting w/ freezes and streaks.
  • per member DM with last day results & best streak

@stepech stepech linked an issue May 7, 2022 that may be closed by this pull request
2 tasks
Copy link
Contributor

@stepech stepech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!!! Just change the logger type and it's good to go imo.

src/HonzaBotner.Services/StandUpStreakService.cs Outdated Show resolved Hide resolved
src/HonzaBotner.Services/StandUpStreakService.cs Outdated Show resolved Hide resolved
src/HonzaBotner.Services/StandUpStreakService.cs Outdated Show resolved Hide resolved
@stepech stepech removed a link to an issue May 7, 2022
2 tasks
tenhobi
tenhobi previously requested changes May 7, 2022
src/HonzaBotner.Services/StandUpStreakService.cs Outdated Show resolved Hide resolved
src/HonzaBotner.Services/StandUpStreakService.cs Outdated Show resolved Hide resolved
src/HonzaBotner.Services/StandUpStreakService.cs Outdated Show resolved Hide resolved
@LucyAnne98 LucyAnne98 requested review from stepech and tenhobi May 7, 2022 11:07
stepech
stepech previously approved these changes May 7, 2022
Copy link
Contributor

@stepech stepech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@stepech
Copy link
Contributor

stepech commented May 7, 2022

Actually @LucyAnne98 we still need that database migration commited

@stepech stepech dismissed their stale review May 7, 2022 19:00

Missing things in implementation

@stepech stepech changed the title StandUpStreak StandUpStreak - implement internal counter May 7, 2022
@stepech stepech marked this pull request as draft May 7, 2022 22:21
Copy link
Contributor

@antoninkriz antoninkriz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside my comments...

...please rename the variable Regex on the line 52 in the file src/HonzaBotner.Discord.Services/Jobs/StandUpJobProvider.cs to something else. It's shadowing the Regex type imported by using System.Text.RegularExpressions;, it's ugly and it makes everyone cry.

src/HonzaBotner.Services/StandUpStatsService.cs Outdated Show resolved Hide resolved
src/HonzaBotner.Services/StandUpStatsService.cs Outdated Show resolved Hide resolved
@LucyAnne98 LucyAnne98 marked this pull request as ready for review May 8, 2022 15:00
@tenhobi tenhobi requested a review from ostorc May 9, 2022 11:28
@tenhobi tenhobi requested a review from stepech May 9, 2022 11:28
@tenhobi
Copy link
Member

tenhobi commented May 9, 2022

Oh, I see you changed the functionality in #344. I have removed the last streak's completed and total counters in the DB. Will add that back in the evening...

@stepech stepech marked this pull request as draft May 10, 2022 11:05
@LucyAnne98 LucyAnne98 marked this pull request as ready for review May 12, 2022 07:09
@stepech stepech marked this pull request as draft May 12, 2022 21:03
@stepech stepech removed request for tenhobi and stepech May 21, 2022 12:41
@stepech stepech marked this pull request as ready for review May 21, 2022 23:31
@stepech
Copy link
Contributor

stepech commented May 21, 2022

@LucyAnne98 can you just quickly check if it follows your idea on how it should have worked?
Currently the info window looks like this:
image

I just hope it's what you wanted and that we haven't tampered with your idea too much... But feel free to request any more changes, or do them yourselves. Thanks a lot for help and initial implementation.

@stepech stepech self-assigned this May 21, 2022
Copy link
Contributor

@ostorc ostorc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, small things to improve.

src/HonzaBotner.Services.Contract/Dto/StandUpStat.cs Outdated Show resolved Hide resolved

if (OkList.Any(s => state.Contains(s)))
foreach (Match match in TaskRegex.Matches(msg.Content))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
foreach (Match match in TaskRegex.Matches(msg.Content))
foreach (var match in TaskRegex.Matches(msg.Content))

to keep it consistent with previous loop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually turned everything red, so I kept it the way it is now.. For some reason once we substitute Mtch for var, it no longer knows that var contains some groups...

@stepech stepech requested a review from ostorc May 23, 2022 15:42
@stepech stepech requested review from ostorc and removed request for ostorc October 3, 2022 14:55
@stepech stepech requested a review from tenhobi October 22, 2022 15:28
@stepech stepech removed their assignment Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants